namespace Collaboris.Saf.Actions.Wss.Tests.Generated
{
    using System.IO;

    using Engine.Report;

    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Saf.Tests;
    using Entities;
    using File;

    using SharePoint.Wss.Files;

    [TestClass]
    public class UpdateFileContentTest
    {

        [TestMethod]
        public void UpdateFileContent_Test()
        {
            WSSTestAssistant<UpdateFileContent, ListFileInfo> updatefilecontent =
                    new WSSTestAssistant<UpdateFileContent, ListFileInfo>(TestEnvironment.PublishingSite, 
                        "UpdateFileContentTestWeb", "BLANKINTERNET#0");

            using (updatefilecontent)
            {
                updatefilecontent.FirstEntity.DiskFilePath =
                    Path.GetDirectoryName(updatefilecontent.FirstSupportingFilePath);

                SPFileHelper.GetFile(updatefilecontent.TestWeb, "pages", "default.aspx").CheckOut();

                MacroReport doReport = updatefilecontent.DoMacro();

                Assert.IsTrue(SPFileHelper.GetFile(updatefilecontent.TestWeb, "pages", "default.aspx").Title == "New Home");

            }
        }

    }
}
